I'm very new and never done DXL scripting before. |
Re: DXL to auto number
The following snippet will assign a sequential number to all objects in the present view, which may or may not be filtered. It assumes that SeqNum has already been created as an attribute (of type integer) for the module
//Populate a sequence number attribute for all objects in a module
/*
Calculates value for SeqNum attribute
*/
Object o
int answer
answer = 1
for o in all current Module do
{
o."SeqNum" = answer
answer = answer + 1
}
|